<body>
	<!-- 头部 -->
	{include file="public/top" /} 
	<!-- /头部 -->
	<div class="main-container container-fluid">
		<div class="page-container">
            <!-- Page Content -->
            <div class="page-content">
                <!-- Page Breadcrumb -->
                <div class="page-body">                      
                <button type="button" tooltip="添加配置" class="btn btn-sm btn-azure btn-addon">网站配置
                </button>
                <div class="row">
                    <div class="col-lg-12 col-sm-12 col-xs-12">
                        <div class="widget">
                            <div class="widget-body">
                                <div class="flip-scroll">
                                    <form action="" method="post">
                                        <table class="table table-bordered table-hover">
                                            <thead class="">
                                                <tr>
                                                    <th class="text-right" width="10%">配置名称</th>
                                                    <th class="text-left">配置值</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                    <?php foreach ($confres as $k => $v):?>
                                                    <tr>
                                                        <td align="right"><?php echo $v['cnname'];?></td>
                                                        <td align="left">
                                                        <?php if($v['type']==1):?>
                                                            <input name="<?php echo $v['enname'];?>" type="text" class="form-control" style="width:620px;" value="<?php echo $v['value'];?>">
                                                        <?php elseif($v['type']==2):?>
                                                            <textarea name="<?php echo $v['enname'];?>" class="form-control" align="left" style="width:620px;">
                                                                <?php echo $v['value'];?>
                                                            </textarea>
                                                        <?php elseif($v['type']==3):
                                                            if($v['values']){
                                                                $arrradio=explode(',', $v['values']);
                                                            }
                                                            foreach ($arrradio as $k1 => $v1):
                                                        ?>
                                                        <label style="margin-right:15px;">
                                                        <input <?php if($v['value']==$v1){echo 'checked="checked"';} ?> name="<?php echo $v['enname'];?>" value="<?php echo $v1;?>" type="radio">
                                                        <span class="text"><?php echo $v1;?></span>
                                                        </label>
                                                        <?php endforeach;?>
                                                        <?php elseif($v['type']==4):?>
                                                            <label>
                                                                <input <?php if($v['value']==$v['values']){echo 'checked="checked"';} ?> name="<?php echo $v['enname'];?>" class="colored-success" value="<?php echo $v['values'];?>" type="checkbox">
                                                                <span class="text"><?php echo $v['values'];?></span>
                                                            </label>
                                                        <?php elseif($v['type']==5):
                                                            if($v['values']){
                                                                $arrselect=explode(',', $v['values']);
                                                            }
                                                        ?>
                                                        <select name="<?php echo $v['enname'];?>">
                                                        <?php foreach ($arrselect as $k2 => $v2):?>
                                                            <option <?php if($v['value']==$v2){echo 'selected="selected"';} ?> value="<?php echo $v2;?>"><?php echo $v2;?></option>
                                                        <?php endforeach;?>
                                                        </select>

                                                        <?php endif;?>
                                                        </td>
                                                    </tr>
                                                    <?php endforeach;?>

                                            </tbody>
                                        </table>
                                        <div  align="right"><input class="btn btn-primary btn-sm shiny" style="margin-right:52%; margin-top:10px;" type="submit" value="提交修改" ></div>
                                    </form>
                                </div>
                                <div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                </div>
                <!-- /Page Body -->
            </div>
            <!-- /Page Content -->
		</div>	
	</div>
    
</body></html>